package selcoursesys.entity;

import javax.persistence.*;

/**
 * Created by Lpbdz on 2017/4/9.
 */
@Entity
@Table(name = "classroom", schema = "manage_system", catalog = "")
public class ClassroomEntity {
    private String rid;
    private String rname;
    private Integer seatnum;

    @Id
    @Column(name = "rid")
    public String getRid() {
        return rid;
    }

    public void setRid(String rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "rname")
    public String getRname() {
        return rname;
    }

    public void setRname(String rname) {
        this.rname = rname;
    }

    @Basic
    @Column(name = "seatnum")
    public Integer getSeatnum() {
        return seatnum;
    }

    public void setSeatnum(Integer seatnum) {
        this.seatnum = seatnum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ClassroomEntity that = (ClassroomEntity) o;

        if (rid != null ? !rid.equals(that.rid) : that.rid != null) return false;
        if (rname != null ? !rname.equals(that.rname) : that.rname != null) return false;
        if (seatnum != null ? !seatnum.equals(that.seatnum) : that.seatnum != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = rid != null ? rid.hashCode() : 0;
        result = 31 * result + (rname != null ? rname.hashCode() : 0);
        result = 31 * result + (seatnum != null ? seatnum.hashCode() : 0);
        return result;
    }
}
